<template>
  <div class="jump-world">
    <canvas id="jump-world-canvas"></canvas>
  </div>
</template>

<script>
import JumpGameWorld from './index'

export default {
  mounted () {
    const game = new JumpGameWorld({
      container: document.querySelector('.jump-world'),
      canvas: document.querySelector('#jump-world-canvas'),
      axesHelper: true
    })
    window.onresize = ()=>{
      game.init()
    }
  }
}
</script>

<style lang="less" scoped>
.jump-world {
    width: 100%;
    height: 100%;
    margin: auto;
    canvas {
        width: 100%;
        height: 100%;
    }
}
</style>